<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width,target-densitydpi=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet"
	href="/dingding-web/plugin/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css"
	href="/dingding-web/common/css/color.css" />
<link rel="stylesheet" type="text/css"
	href="/dingding-web/common/css/common.css" />
<link rel="stylesheet" type="text/css"
	href="/dingding-web/shop/css/coupondetail.css" />
<link rel="stylesheet" href="/dingding-web/common/css/mui.min.css" />
<script type="text/javascript"
	src="/dingding-web/plugin/jquery/jquery-1.12.1.js"></script>
<script type="text/javascript"
	src="/dingding-web/plugin/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript"
	src="/dingding-web/plugin/juicer/juicer-min.js"></script>
<script type="text/javascript" src="/dingding-web/common/js/mui.min.js"></script>
<script type="text/javascript" src="/dingding-web/common/js/system.js"></script>
<script type="text/javascript"
	src="/dingding-web/shop/js/coupondetail.js"></script>
<title>商品详情</title>
</head>

<body>
	<script type="text/template" id="priceInfoTpl">

			<div class="">
				<div id="carousel-generic" class="carousel slide" data-ride="carousel">
					<!-- Indicators -->
					<ol class="carousel-indicators">
						{@each commodityInfoPic as pic,index} {@if index == 0}
						<li data-target="#carousel-generic" data-slide-to="${index}" class="active"></li>
						{@else}
						<li data-target="#carousel-generic" data-slide-to="${index}"></li>
						{@/if} {@/each}
					</ol>

					<div class="carousel-inner" role="listbox">
						{@each commodityInfoPic as pic,index} {@if index == 0}
						<div class="item active" name="${index}">
							{@else}
							<div class="item" name="${index}">
								{@/if}
								<img src="${pic.commodityInfoPic}" alt="${pic.commodityInfoPic}" width="100%" />
							</div>
							{@/each}
						</div>
					</div>
				</div>
			</div>
			<div class="price">
				<span class="inte-num orange">${commodityInfo.price}</span>
				<span class="inte-font orange">&nbsp;积分</span>
			</div>

			{@if  commodityInfo.name=="保养券"}
<div  class="buy-button"><button  class="btn  btn-danger  jump">兑换</button></div>
{@else}
{@if  integral>=commodityInfo.price}
<div  class="buy-button"><button  class="btn  btn-danger"  data-toggle="modal"  data-target="#buyItemModal"  id="buyItemNow">兑换</button></div>
{@else}
<div  class="buy-button"><button  class="btn  btn-danger"  data-toggle="modal"  disabled="disabled">兑换</button></div>
{@/if}
{@/if}
			<div class="space-line"></div>
			<div class="detail-body">
				<div class="detail-content ">
					<div class="detail-item ">$${commodityInfo.descript}</div>
				</div>
				{@if  commodityInfo.name=="保养券"}
{@else}
<div  class="detail-foot">
<button  class="btn  btn-block  btn-danger"  onclick="searchStore()">点击查询可使用门店</button>
</div>
{@/if}
			</div>
			<div class="modal" role="dialog" id="showSuccess">
				<div class="modal-dialog text-center" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<h4 class="modal-title" id="gridSystemModalLabel">提示</h4>
						</div>
						<div class="modal-body">
							<h4>您已成功购买${commodityInfo.name},你可以在我的钱包-->券中查看详情</h4><br />
							<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="goRefresh()">确定</button>
						</div>
					</div>
				</div>
			</div>

			<div class="modal" role="dialog" id="buyItemModal">
				<div class="modal-dialog text-center" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<h4 class="modal-title" id="gridSystemModalLabel">提示</h4>
						</div>
						<div class="modal-body">
							<h4>是否购买${commodityInfo.name}</h4><br />
							<button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
							<button type="button" class="btn btn-primary" onclick="buyItem()">确定</button>
						</div>
					</div>
				</div>
			</div>

			<div class="modal" role="dialog" id="showFaild">
				<div class="modal-dialog text-center" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<h4 class="modal-title" id="gridSystemModalLabel">提示</h4>
						</div>
						<div class="modal-body">
							<h4>购买失败!请检查剩余积分后重试</h4><br />
							<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="goRefresh()">确定</button>
						</div>
					</div>
				</div>
			</div>
		</script>
	<div class="body-content"></div>
</body>

</html>